#ifndef		CLIENT_HPP_
# define	CLIENT_HPP_

# include	<iostream>
# include	<string>

# include	"ACommunicator.hpp"
# include	"Connected.hpp"
# include	"SockInfo.hpp"

class ClientTcp : public ACommunicator
{
  Connected	Co;
  std::string	Machine;

  int		Network();
  int		ReadOrWrite();

  virtual int TraitementBuf();
  virtual int	CheckIsComplete(Connected	&Co,
				int		fd);
  
  virtual int	TryToWrite(std::list<Buffer *> &writeBuf,
			   int fd);
  virtual int	TryToRead(Buffer &readBuf,
			  int fd);
  
  int	Connection();
  
public:
  ClientTcp(int		port,
	    std::string	machine);
  virtual ~ClientTcp();

  int		Run();
};

#endif		/* CLIENT_HPP_ */
